<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <!--<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no"/>-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="web description is me">
    <meta name="author" content="wangqinmin">
    <link rel="icon" href="../img/icon/B.ico">
    <title>21_bootstrap弹出与警告框</title>
    <link rel="stylesheet" href="../bootstrap-3.3.7/css/bootstrap.css"/>
    <!--<link rel="stylesheet" href="../bootstrap-3.3.7/css/bootstrap-theme.css"/>-->
    <link href="../css/ie10-viewport-bug-workaround.css" rel="stylesheet">
    <!--<link href="../css/starter-template.css" rel="stylesheet">-->
    <script type="text/javascript" src="../jquery-3.3.1/jquery-3.3.1.js"></script>
    <script type="text/javascript" src="../bootstrap-3.3.7/js/bootstrap.js"></script>

    <script type="text/javascript">
        $(function () {
            $('[data-toggle="popover"]').popover();
        });

    </script>
</head>
<body>

<!-- container：作用相当于一个自动居中的容器(用的地方很多，不然样式可能难看) -->
<div class="container">
    <div class="row" style="margin: 100px">
        <h1>弹出</h1>
        <button type="button" class="btn btn-info" title="标题文本" data-toggle="popover" data-placement="left">弹出与警告框1</button>

        <button type="button" class="btn btn-lg btn-danger" data-toggle="popover" title="标题" data-content="内容。；；。肯定是批发">弹出与警告框2</button>

        <button type="button" class="btn btn-sm btn-info" data-toggle="popover" title="标题" data-content="内容。；；。肯定是批发">弹出与警告框2</button>

        <div style="width: 100px;height: 100px"></div>

        <button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="left" data-content="内容。；；。肯定是批发">
            Popover on 左侧
        </button>

        <button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="top" data-content="内容。；；。肯定是批发">
            Popover on 顶部
        </button>

        <button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="bottom" data-content="内容。；；。肯定是批发">
            Popover on 底部
        </button>

        <button type="button" class="btn btn-default" data-container="body" data-toggle="popover" data-placement="right" data-content="内容。；；。肯定是批发">
            Popover on 右侧
        </button>

        <div style="width: 100px;height: 100px"></div>
        为了更好的跨浏览器和跨平台效果，你必须使用 a 标签，不能使用 button 标签，并且，还必须包含 role="button" 和 tabindex 属性。
        <a tabindex="0" class="btn btn-lg btn-danger" role="button" data-toggle="popover" data-trigger="focus" title="标题" data-content="点击其他位置，失焦、失焦、失焦、失焦、失焦、失焦、失焦、失焦、">可消失的弹出框</a>

        <div style="width: 100px;height: 100px"></div>
        <h1>警告框</h1>
        <div class="alert alert-info fade in">
           <button type="button"  class="close" data-dismiss="alert">&times;</button>
            <p>这里是警告的内容</p>
            <button type="button" class="btn btn-danger" data-dismiss="alert">关闭</button>
        </div>

    </div>

</div>
</body>
</html>